package com.YxyBackMange.Entity.Ware;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Set;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 实体类WareGoodsInfo
 * 数据表ware_tb_goods_info
 * 商品信息表
 * 2017-12-3 3:47:31
 * @author Administrator
 *
 */
@Table(name = "ware_tb_goods_info")
public class WareGoodsInfo  implements Serializable {

	//主键


	private Integer id;
	//商品名称


	private String goodsName;
	//原价格


	private Double oldPrice;
	//新价格


	private Double nowPrice;
	//库存


	private Integer stock;
	//销量


	private Integer sales;
	//上架时间


	private Date createTime;
	//预览图


	private String previewImgAddress;
	//简介描述


	private String goodsDescribe;
	//禁用


	private Integer disabled;
	//首拼查询


	private String goodsPinyin;
	//是否为推荐商品


	private Integer isNominate;
	//品牌编号


	private Integer goodsBrandId;
	//商品标签编号


	private Integer goodsLabel;
	//商品详情外键

	private Integer detailsId;
	//0为非预约类型，1为预约类型商品
	private Integer goodsTypeId;

	private Integer isAppointment;
	@Transient
	private List<WareGoodsAttr> wareGoodsAttrList;
	@Transient
	private WareGoodsType wareGoodsType;
	@Transient
	private WareGoodsBrand wareGoodsBrand;
	@Transient
	private WareGoodsDetails goodsDetails;
	@Transient
	private List<WareGoodsImg> goodsImgList;

	public WareGoodsInfo() {
	}
	public WareGoodsInfo(Integer id) {
		this.id=id;
	}
	public WareGoodsInfo(String goodsName, Double oldPrice, Double nowPrice, Integer stock, Integer sales, Date createTime, String previewImgAddress, String goodsDescribe, Integer disabled, String goodsPinyin, Integer isNominate, Integer goodsBrandId, Integer goodsLabel, Integer detailsId, Integer goodsTypeId, Integer isAppointment, List<WareGoodsAttr> wareGoodsAttrList, WareGoodsType wareGoodsType, WareGoodsBrand wareGoodsBrand, WareGoodsDetails goodsDetails, List<WareGoodsImg> goodsImgList) {
		this.goodsName = goodsName;
		this.oldPrice = oldPrice;
		this.nowPrice = nowPrice;
		this.stock = stock;
		this.sales = sales;
		this.createTime = createTime;
		this.previewImgAddress = previewImgAddress;
		this.goodsDescribe = goodsDescribe;
		this.disabled = disabled;
		this.goodsPinyin = goodsPinyin;
		this.isNominate = isNominate;
		this.goodsBrandId = goodsBrandId;
		this.goodsLabel = goodsLabel;
		this.detailsId = detailsId;
		this.goodsTypeId = goodsTypeId;
		this.isAppointment = isAppointment;
		this.wareGoodsAttrList = wareGoodsAttrList;
		this.wareGoodsType = wareGoodsType;
		this.wareGoodsBrand = wareGoodsBrand;
		this.goodsDetails = goodsDetails;
		this.goodsImgList = goodsImgList;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Double getOldPrice() {
		return oldPrice;
	}

	public void setOldPrice(Double oldPrice) {
		this.oldPrice = oldPrice;
	}

	public Double getNowPrice() {
		return nowPrice;
	}

	public void setNowPrice(Double nowPrice) {
		this.nowPrice = nowPrice;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public Integer getSales() {
		return sales;
	}

	public void setSales(Integer sales) {
		this.sales = sales;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getPreviewImgAddress() {
		return previewImgAddress;
	}

	public void setPreviewImgAddress(String previewImgAddress) {
		this.previewImgAddress = previewImgAddress;
	}

	public String getGoodsDescribe() {
		return goodsDescribe;
	}

	public void setGoodsDescribe(String goodsDescribe) {
		this.goodsDescribe = goodsDescribe;
	}

	public Integer getDisabled() {
		return disabled;
	}

	public void setDisabled(Integer disabled) {
		this.disabled = disabled;
	}

	public String getGoodsPinyin() {
		return goodsPinyin;
	}

	public void setGoodsPinyin(String goodsPinyin) {
		this.goodsPinyin = goodsPinyin;
	}

	public Integer getIsNominate() {
		return isNominate;
	}

	public void setIsNominate(Integer isNominate) {
		this.isNominate = isNominate;
	}

	public Integer getGoodsBrandId() {
		return goodsBrandId;
	}

	public void setGoodsBrandId(Integer goodsBrandId) {
		this.goodsBrandId = goodsBrandId;
	}

	public Integer getGoodsLabel() {
		return goodsLabel;
	}

	public void setGoodsLabel(Integer goodsLabel) {
		this.goodsLabel = goodsLabel;
	}

	public Integer getDetailsId() {
		return detailsId;
	}

	public void setDetailsId(Integer detailsId) {
		this.detailsId = detailsId;
	}

	public Integer getGoodsTypeId() {
		return goodsTypeId;
	}

	public void setGoodsTypeId(Integer goodsTypeId) {
		this.goodsTypeId = goodsTypeId;
	}

	public Integer getIsAppointment() {
		return isAppointment;
	}

	public void setIsAppointment(Integer isAppointment) {
		this.isAppointment = isAppointment;
	}

	public List<WareGoodsAttr> getWareGoodsAttrList() {
		return wareGoodsAttrList;
	}

	public void setWareGoodsAttrList(List<WareGoodsAttr> wareGoodsAttrList) {
		this.wareGoodsAttrList = wareGoodsAttrList;
	}

	public WareGoodsType getWareGoodsType() {
		return wareGoodsType;
	}

	public void setWareGoodsType(WareGoodsType wareGoodsType) {
		this.wareGoodsType = wareGoodsType;
	}

	public WareGoodsBrand getWareGoodsBrand() {
		return wareGoodsBrand;
	}

	public void setWareGoodsBrand(WareGoodsBrand wareGoodsBrand) {
		this.wareGoodsBrand = wareGoodsBrand;
	}

	public WareGoodsDetails getGoodsDetails() {
		return goodsDetails;
	}

	public void setGoodsDetails(WareGoodsDetails goodsDetails) {
		this.goodsDetails = goodsDetails;
	}

	public List<WareGoodsImg> getGoodsImgList() {
		return goodsImgList;
	}

	public void setGoodsImgList(List<WareGoodsImg> goodsImgList) {
		this.goodsImgList = goodsImgList;
	}

	@Override
	public String toString() {
		return "WareGoodsInfo{" +
				"id=" + id +
				", goodsName='" + goodsName + '\'' +
				", oldPrice=" + oldPrice +
				", nowPrice=" + nowPrice +
				", stock=" + stock +
				", sales=" + sales +
				", createTime=" + createTime +
				", previewImgAddress='" + previewImgAddress + '\'' +
				", goodsDescribe='" + goodsDescribe + '\'' +
				", disabled=" + disabled +
				", goodsPinyin='" + goodsPinyin + '\'' +
				", isNominate=" + isNominate +
				", goodsBrandId=" + goodsBrandId +
				", goodsLabel=" + goodsLabel +
				", detailsId=" + detailsId +
				", goodsTypeId=" + goodsTypeId +
				", isAppointment=" + isAppointment +
				", wareGoodsAttrList=" + wareGoodsAttrList +
				", wareGoodsType=" + wareGoodsType +
				", wareGoodsBrand=" + wareGoodsBrand +
				", goodsDetails=" + goodsDetails +
				", goodsImgList=" + goodsImgList +
				'}';
	}
}
